package com.yu.test.com.component;


import com.yu.annotion.Component;
import com.yu.commoninterface.BeanPostProcessor;

import javax.management.MBeanAttributeInfo;

// 自定义Bean后置处理器
@Component
public class MyBeanPostProcessor implements BeanPostProcessor {
    @Override
    public Object postProcessBeforeInitialization(Object bean, String beanName) {
        System.out.println("后置处理器 Bean初始化之前的事件回调: " + beanName + "开始初始化...");
        return bean;
    }

    @Override
    public Object postProcessAfterInitialization(Object bean, String beanName) {
        System.out.println("后置处理器 Bean初始化之后的事件回调: " + beanName + "初始化完成...");
        return bean;
    }
}
